import 'package:flutter/material.dart';
import 'package:xiongmao_clean_flutter_module/res/colors.dart';

class CustomCreditListItem extends StatelessWidget {
  final String title;
  final String statusName;
  final String description;
  final String subDescription;

  CustomCreditListItem({required this.title, required this.statusName, required this.description, required this.subDescription});

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      margin: const EdgeInsets.only(top: 10),
      padding: const EdgeInsets.all(16.0),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            children: [
              Expanded(
                child: Container(
                  child: Text(
                    title,
                    style: TextStyle(color: Colours.base_primary, fontSize: 16.0, fontWeight: FontWeight.bold),
                  ),
                ),
              ),
              Container(
                child: Text(
                  statusName,
                  style: TextStyle(color: Colours.base_primary, fontSize: 16.0, fontWeight: FontWeight.bold),
                ),
              ),
            ],
          ),
          Text(
            description,
            style: TextStyle(color: Colors.black, fontSize: 13.0),
          ),
          SizedBox(height: 14.0),
          Text(
            subDescription,
            style: TextStyle(color: Colors.grey, fontSize: 10),
          ),
        ],
      ),
    );
  }
}
